﻿// Write a program that gets two numbers from the console and prints the greater of them. Don’t use if statements.

using System;

class PrintGreaterNumber
{
    static void Main()
    {
        Console.Write("Enter first number: ");
        string numberStr1 = Console.ReadLine();
        double number1;
        if (! double.TryParse(numberStr1, out number1))
        {
            Console.WriteLine("Your first number is invalid!");
        }
        
        Console.Write("Enter second number: ");
        string numberStr2 = Console.ReadLine();
        double number2;
        if (! double.TryParse(numberStr2, out number2))
        {
            Console.WriteLine("Your second number is invalid!");
        }

        double greaterNumber = Math.Max(number1, number2);
        Console.WriteLine("The greater number of the two entered is: {0}", greaterNumber);
    }
}
